const Router = require('koa-router');
const { getKanbanList, createKanban, sortKanban, deleteKanbanById, updateKanbanById } = require('../controller/kanban.controller');
const { idValidator, sortValidator } = require('../middleware');
const { kanbanValidatorMiddleware } = require('../middleware/kanban.middleware');
const router = new Router();

router.get('/:projectId', getKanbanList);//看板列表
router.post('/create', kanbanValidatorMiddleware, createKanban);//新建
router.post('/sort', sortValidator, sortKanban);//排序
router.post('/del', idValidator, deleteKanbanById);
router.post('/edit', idValidator, updateKanbanById);
module.exports = router;